﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.OleDb;
using BLL.Entities.Company;
using BLL.Entities;

namespace HTAProDataImporter.Transport
{
    public class JudgeTransport : BaseEntityTransport
    {
        public override string CommandText
        {
            get { return "select * from tblJudge"; }
        }

        public override void InstanceFromReader(OleDbDataReader DR)
        {
            Judge judge = Judge.CreateNewInstance<Judge>();

            judge.Person.FirstName = DR["Firstname"].ToString();
            judge.Person.LastName = DR["LastName"].ToString();
            judge.Notes = DR["Notes"].ToString();

            DataStore.Judges.Add(DR["pkJudgeID"].ToString(), judge);

        }
    }
}
